package cn.tedu.um2.mapper;



import cn.tedu.um2.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface UserMapper {


    //查询用户--根据ID查
    @Select("select * from user where id=#{id}")
    public User selectUserById(int id);
    //增加用户
    public int insertUser(User user);
    //修改用户
    public int updateUser(User user);
    //删除用户
    public int deleteUserById(int id);

    //查询用户--根据用户名密码查
    public User selectUserByUsernameAndPassword(String username,String password);
    //根据用户名查询
    public List<User> selectUserByUsername(String username);
    //全查
    public List<User> selectAllUsers();
}
